﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="ListWarrantyService.aspx.cs" Inherits="VSM.ListWarrantyService" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        function openMultiItemDialog() {
            var tabid = '<%= Request.QueryString["requestType"] %> ';
            javascript: Main.openCustomDialog('../../ItemPopup.aspx?ItemCategory=' + '102', 600, 610, "");
        }

        function openCustomer() {
            var url = "Popup_Customer.aspx?CustomerCode=S";
            Main.openCustomDialog(url, 650, 410);
        }

        function openVehicle() {
            var url = "Popup_Vehice.aspx?VehicleCode=S";
            Main.openCustomDialog(url, 650, 410);
        }

        function disablePopup(sender, evt) {

            var charCode = (evt.which) ? evt.which : event.keyCode;
            if (charCode == 13)
                return true;

            return true;
        }

        function loadQuotationReport() {
            var url = "rptQuotation.aspx?QuotationCode=S";
            Main.openCustomDialog(url, 650, 410);
        }

        function openWSC() {
            window.location.href= "WarrantyService.aspx";
        }
    </script>
    <div>
        <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:HiddenField ID="DealerCode" runat="server" />
                <h2>
                    Warranty Service</h2>
                <div style="margin-left: 5px; width: 99%;">
                    <hr />
                   

                      <table border="0" width="100%" style="background-color: #D1D4D8;">
                                    <tr>
                                        <td class="FormLineItemAlt" style="width: 15%">
                                            From Date:</td>
                                        <td class="FormLineItemAlt" style="width: 35%">
                                            <asp:TextBox ID="txtFromDate" runat="server" Width="90%"></asp:TextBox>
                                            <asp:ImageButton ID="ImageButton1" runat="Server" AlternateText="Click to show calendar"
                                                ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                            <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtFromDate"
                                                PopupButtonID="ImageButton1" Format="dd/MM/yyyy">
                                            </cc1:CalendarExtender>
                                        </td>
                                        <td class="FormLineItemAlt" style="width: 10%">
                                            To Date:
                                        </td>
                                        <td class="FormLineItemAlt" style="width: 35%">
                                            <asp:TextBox ID="txtToDate" runat="server" Width="90%"></asp:TextBox>
                                            <asp:ImageButton ID="ImageButton2" runat="Server" AlternateText="Click to show calendar"
                                                ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                            <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtToDate"
                                                PopupButtonID="ImageButton2" Format="dd/MM/yyyy">
                                            </cc1:CalendarExtender>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="FormLineItemAlt" style="width: 15%">
                                            Status:</td>
                                        <td class="FormLineItemAlt" style="width: 35%">
                                            <asp:DropDownList ID="ddlStatus" runat="server" Width="90%">
                                            </asp:DropDownList>
                                        </td>
                                         <td class="FormLineItemAlt" style="width: 15%">
                                             &nbsp;</td>
                                        <td class="FormLineItemAlt" style="width: 35%">
                                            &nbsp;</td>
                                    </tr>
                                </table>


                    <table border="0" width="100%" style="background-color: #D1D4D8;">
                        <tr>
                            <td class="FormLineItemAlt" >
                                <asp:Button ID="btn_Filter" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                    Height="30px" Text="Filter" Width="100px" />
                            </td>
                        </tr>
                    </table>

                    <table border="0" width="100%" style="background-color: #D1D4D8;">
                    <asp:GridView ID="grvPO" CssClass="GridInner" runat="server" Width="100%" BorderColor="White"
                            BackColor="White" AllowSorting="True" AutoGenerateColumns="False" CellPadding="2"
                            HeaderStyle-Height="27px" CellSpacing="2" 
                            OnRowUpdating="UpdateItem" HeaderStyle-VerticalAlign="Middle" 
                            AllowPaging="True" OnRowDeleting="DeleteItem">
                            <PagerSettings Mode="NumericFirstLast" />
                            <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                            <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                            <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                            <Columns>
 <%--                               <asp:CommandField HeaderText="Action" ShowDeleteButton="True" ShowEditButton="False"
                                    Visible="false" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                    ItemStyle-Width="10px" />--%>
                                <asp:TemplateField HeaderText="Action">
                                    <ItemStyle HorizontalAlign="Left"  Width="60px" />
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemTemplate>
                                        <asp:Button ID="btnView" runat="server" Text="View"  BackColor="#1B7FC2" ForeColor="#FFFFFF" OnClientClick="openWSC();"/>
                                        <asp:Button ID="btnApprove" runat="server" Text="Approve"   BackColor="#1B7FC2" ForeColor="#FFFFFF"/>
                                         <asp:Button ID="btnReject" runat="server" Text="Reject"  BackColor="#1B7FC2" ForeColor="#FFFFFF"/>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="#">
                                    <ItemStyle HorizontalAlign="Center" Width="20px" />
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblNo" runat="server" Text='<%# Bind("No") %>' BorderStyle="none">
                                        </asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="WSC Order">
                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                    <HeaderStyle VerticalAlign="Middle" Font-Bold="true" />
                                    <ItemTemplate>
                                        <asp:Label ID="lbWSCOrder" runat="server" Text='<%# Bind("WSCOrder") %>' ></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Date">
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemStyle HorizontalAlign="Center" Width="100px" />
                                    <ItemTemplate>
                                        <asp:Label ID="lbDate" runat="server" Width="97%" Text='<%# Bind("Date") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Status">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <HeaderStyle VerticalAlign="Middle" Width="100px" />
                                    <ItemTemplate>
                                        <asp:Label ID="lbStatus" Style="text-align: left" runat="server" Text='<%# Bind("Status") %>'/>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle BackColor="#6095C9" Font-Bold="true" ForeColor="#ffffff" Font-Overline="False"
                                Height="27px" VerticalAlign="Bottom" />
                            <EmptyDataTemplate>
                                <table class="GridInner" style="width: 100%; border-color: White;" border="1" rules="all"
                                    cellspacing="2" cellpadding="2">
                                    <tr valign="middle" style="height: 27px; color: white; font-weight: bold; text-decoration: none;
                                        background-color: rgb(96, 149, 201);">
                                        <th>
                                            <span>Action</span>
                                        </th>
                                        <th>
                                            <span>#</span>
                                        </th>
                                        <th>
                                            <span>WSC Order</span>
                                        </th>
                                        <th>
                                            <span>Date</span>
                                        </th>
                                        <th>
                                            <span>Status</span>
                                        </th>
                                    </tr>
                                    <tr>
                                        <td colspan="5">
                                            <span>No Data</span>
                                        </td>
                                    </tr>
                                </table>
                            </EmptyDataTemplate>
                        </asp:GridView>
                    </table>
                    <asp:Button ID="btn_Submit" runat="server" BackColor="#1B7FC2" 
                        ForeColor="#FFFFFF" Height="30px" Text="Submit" Width="90px" />
                    
                </div>
                <table width="100%" border="0">
                    <tr>
                        <td>
                            <table style="width: 100%">
                                <tr>
                                    <td style="width: 220px;">
                                      
                                    </td>
                                    <td>
                                        <asp:Label ID="lblError" runat="server" Visible="False" Font-Bold="True" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
